function fnLogin(){
    var oUname = document.getElementById("uname");
    var oUpass = document.getElementById("upass");
    var isError=1;
    if(oUname.value.length > 20 || oUname.value.length < 6){
        $('#error-msg').val("用户名请输入6-20位字符")
        isError = 0;
        $("#isError").val(isError);
        return;
    }
    else if((oUname.value.charCodeAt(0)>=48) && (oUname.value.charCodeAt(0)<=57)){
        $('#error-msg').val("首字符必须为字母")
        isError = 0;
        $("#isError").val(isError);
        return;
    }
    else for(var i=0;i<oUname.value.length;i++){
        if (((oUname.value.charCodeAt(i)<48)||(oUname.value.charCodeAt(i)>57)) && ((oUname.value.charCodeAt(i)<97)||(oUname.value.charCodeAt(i)>122)) &&
            ((oUname.value.charCodeAt(i)<65)||(oUname.value.charCodeAt(i)>90))){
            $('#error-msg').val("必须为字母跟数字组成")
            isError = 0;
            $("#isError").val(isError);
            return;
        }
    }
    if (oUpass.value.length > 20 || oUpass.value.length < 6) {
        $('#error-msg').val("密码请输入6-20位字符")
        isError = 0;
        $("#isError").val(isError);
        return;
    }
    if(isError == 1){
        $("#isError").val(isError);
        $('#error-msg').val("登录成功");
    }
}